/**
 * @Author 12629
 * @Description：
 */
public class Test {

    public static void main(String[] args) {

        int a = 10;
        int b = 20;
        //int c = a + ((b - a) >> 1);
        int c = a + (b - a) >> 1;
        System.out.println(c);


        //10;
        /*int a = 10;
        int b = 20;
        int max  = a > b ? a : (int)1.2;
*/

       /* boolean f = (true == true) ? false : true;
        boolean flg = true == true ?  f : true;
        System.out.println(flg);
*/

//        int a = 1;
//        System.out.println(!a); ctr + /

        /*System.out.println(!true);ctr+shift+/
        System.out.println(!false);*/


        //System.out.println(10 > 20 && 10 / 0 == 0);
        //System.out.println(10 > 20 || 10 / 0 == 0);


        //System.out.println(10 < 20 & 2 < 5);
        //System.out.println(10 > 20 & 10 / 0 == 0);

    }
    public static void main15(String[] args) {
        int a = 1;
        int b = 2;
        System.out.println(a == 1 && b == 2); // 左为真 且 右为真 则结果为真
        System.out.println(a == 1 && b > 100); // 左为真 但 右为假 则结果为假
        System.out.println(a > 100 && b == 2); // 左为假 但 右为真 则结果为假
        System.out.println(a > 100 && b > 100); // 左为假 且 右为假 则结果为假
    }

    public static void main14(String[] args) {
        int a = 10;
        int b = 20;
        // 注意：在Java中 = 表示赋值，要与数学中的含义区分
        // 在Java中 == 表示相等
        System.out.println(a == b); // false
        System.out.println(a != b); // true
        System.out.println(a < b); // true
        System.out.println(a > b); // false
        System.out.println(a <= b); // true
        System.out.println(a >= b); // false


        //System.out.println(3 < a < 5);
    }



    public static void main13(String[] args) {
        int a = 10;
        //int b = ++a;//a=a+1  b = a
        int b = a++;//b = a  a=a+1
        System.out.println(a);
        System.out.println(b);
        System.out.println("=====");
        int i = 10;
        i = i++;
        System.out.println(i);
    }

    public static void main12(String[] args) {
        int a = 10;
        long b = 20;
        //a = (int)(a + b);
        a += b;
        System.out.println(a);
    }

    public static void main11(String[] args) {
        System.out.println(5%3);//2
        System.out.println(-5%3);
        System.out.println(-5%-3);
        System.out.println(5%-3);
        System.out.println("========");
        System.out.println(11.5%2.0);
    }

    public static void main10(String[] args) {
        int a = 123;
        //String s = a+"";
        String s = String.valueOf(a);
        System.out.println(s);

        String val = "123";
        //int ret1 = Integer.valueOf(val);
        int ret2 = Integer.parseInt(val);
        System.out.println(ret2+1);
    }

    public static void main9(String[] args) {
        String s1 = "hello";
        System.out.println(s1);

        String s2 = "world";
        System.out.println(s2);

        //拼接
        String s3 = s1 + " " + s2;
        System.out.println(s3);
        System.out.println("========");
        int a = 10;
        int b = 20;

        //a=10,b=20
        System.out.println("a = "+a +", b = "+b);
        System.out.println("a+b = "+(a+b));

        System.out.println(a+b+" = a+b");
    }

    public static void main8(String[] args) {
        System.out.println("输出且换行");
        System.out.print("输出但是不换行");
        System.out.printf("%d\n",10);

        int a = 10;
        long b = 20;
        long c = a+b;


        byte b1 = 10;
        byte b2 = 20;
        int b3 = b1+b2;

    }

    public static void main7(String[] args) {
        /*
            计算机 将来 是  新基建

            近几年 哪个行业都不好

            int a = 10;
            long b = 20L;

            a = (int)b;    小厂            中厂       大厂
                         10W左右          10W-20W     20W+
                        叫不起名字         深信服

              理性判断：
              1. 公司的实力
              2. 你的实力

        */

        byte a = 10;//-128  127
        int b = 128;

        a = (byte)b;
        System.out.println(a);
    }

    public static void main6(String[] args) {
        float f = 12.5F;

        char ch = '高';

        System.out.println(ch);

        char ch2 = 97;
        System.out.println(ch2);

        Character character = 'a';


        boolean flg1 = true;
        boolean flg2 = false;

        System.out.println(flg2);

        //boolean flg3 = 1;

    }

    //8个字节
    public static void main5(String[] args) {
        double d = 12.5;
        System.out.println(d);

        double x1 = 1.1;
        double x2 = 1.1;
        System.out.println(x1 * x2);
        //TODO:如何判断小数和0的比较

        int a = 1;
        int b = 2;
        System.out.println(a/b);
    }

    //1个字节  8bit位  -128   127
    public static void main4(String[] args) {
        byte b = 12;
        System.out.println(b);
    }
    //2个字节  16bit  2^15  -1
    public static void main3(String[] args) {
        short s = 2;
        System.out.println(s);
        System.out.println(Short.MAX_VALUE);
        System.out.println(Short.MIN_VALUE);
    }
    //8个字节
    public static void main2(String[] args) {
        long a = 10L;
        System.out.println(a);

        System.out.println(Long.MIN_VALUE);
        System.out.println(Long.MAX_VALUE);
    }

    public static void main1(String[] args) {
        int a = 10;
        int b;
        b = 20;

        int c = 0 ;
        System.out.println(c);

        System.out.println(Integer.MIN_VALUE);
        System.out.println(Integer.MAX_VALUE);

        Integer d = 199;
        System.out.println(d);


        int e = 2147483647;
        System.out.println(e);
    }
}
